The document “Universal Serial Bus Specification”, Revision 2.0, Apr. 27, 2000 by Compaq, Hewlett-Packard, Intel, Lucent, Microsoft, NEC and Philips defines an industry-standard USB, which enable an easy to use connection between a personal computer (PC) acting as a host and another device acting as a PC peripheral. Host and peripheral may be interconnected by a USB cable. The host is responsible for initiating all data transactions between host and peripheral, while the peripheral responds to bus requests from the host.
According to the USB specification, a host obtains information about the functions supported by a peripheral during an enumeration process. When connecting a peripheral to a host, the peripheral will announce in this enumeration process more specifically all USB classes and interfaces it provides in its current USB mode. The term USB mode is used in the present document to define a state of a device in which it supports a predetermined set of USB classes and/or interfaces. A class identifies a function provided by the peripheral, for example a keyboard function, a printer function or a mass storage function, etc. A composite or compound peripheral may provide a plurality of different classes. Thus, in different USB modes of the peripheral, the host may access different functions of the peripheral. An interface is a related set of endpoints that present a single feature or function of the peripheral to the host. The protocol used to communicate with this related set of endpoints and the purpose of each endpoint within the interface may be specified as part of a device class or vendor-specific definition. A mobile phone with three different USB modes, for example, may support in a first USB mode “Mode 1” a Wireless Mobile Communication (WMC) OBject EXchange (OBEX) interface, a MODEM interface, and some proprietary interfaces. It may further support in a second USB mode “Mode 2” only an Mass Storage Class (MSC) interface. It may further support in a third USB mode “Mode 3” only a Still Image Capture Device (SICD) interface, for instance as a base for Picture Transfer Protocol (PTP) and PictBridge or Media Transfer Protocol (MTP).
It is a disadvantage of the USB standard that the peripheral only announce the classes and interfaces that are supported in the current USB mode of the peripheral. The host may only detect other functions of a peripheral by starting the connection setup again. In the scope of this new setup, the peripheral may then possibly announce another set of classes in a new enumeration process. In an alternative approach for detecting additional classes of a peripheral, a user query may be used. In such a user query, a user may be asked which function of the peripheral should be used, and this function is then announced to the host on the USB bus.
In the USB specification, a device can moreover be only a host or only a peripheral. The fixed role of a device can also be identified by its connector, as USB cables have different plugs on their two ends. A host has more specifically a Standard A receptacle and a peripheral has more specifically a Standard B receptacle. This approach is well suited for a computer environment, which USB was originally designed for. Here, the PC is always the host, and devices that are connected to the PC are always peripherals. Peripherals provided with a USB interface could also benefit from an interaction among each other, though.
A more flexible use of a USB connection is enabled by the “On-The-Go Supplement to the USB 2.0 Specification”, Revision 1.0a, Jun. 23, 2003. The USB On-The-Go (OTG) additions to the USB standard allow USB connectivity for devices, which do not have such a clear host or peripheral role as a PC and a memory card reader. Dual-role devices typically perform multiple functions, like a mobile phone, a personal digital assistant (PDA), or a digital camera. For example, a mobile phone might have to be a peripheral providing a class “mass storage” when connected to a PC, while it might have to be a host when connected to a printer or an external keyboard etc.
Based on the USB-OTG, a clear host device may have a Standard-A receptacle or a Mini-A receptacle, while a clear peripheral device may have a Standard-B receptacle or a Mini-B receptacle. In addition an OTG device has a Mini-AB receptacle, the latter enabling a connection of either a Mini-A plug for hosts or a Mini-B plug for peripherals. An OTG device must further support a limited host capability and a specified Host Negotiation Protocol (HNP). In USB-OTG, the respective role of the involved devices is thus assigned by the USB cable as well. However, if the connected devices are OTG devices, a role switch can be performed after the connection has been established based on the HNP.
Still, if a user connects two USB-OTG devices, the only function or set of functions that can be performed is the one that is associated to the class or the set of classes announced by the device to which the peripheral role was assigned by the way the user connected the USB cable. If the user desires to make use of a different function or set of functions, he/she may trigger a “disconnect-reconnect”, for example by means of a user input through a user interface, hoping that the peripheral would announce a second class or set of classes. Alternatively, the user might cause a “role switch” based on the HNP, hoping that the former host would then announce the desired class or set of classes in the peripheral role.